home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 922 < prev    next >
Encoding:
Text File  |  1996-08-05  |  906 b   |  45 lines

  1. Path: news.ust.hk!ee_ckmaa
  2. From: ee_ckmaa@uxmail.ust.hk (Chan Ka Ming)
  3. Newsgroups: comp.lang.c
  4. Subject: help Visual C++
  5. Date: 10 Jan 1996 04:15:20 GMT
  6. Organization: The Hong Kong University of Science and Technology
  7. Message-ID: <4cvego$50c@news.ust.hk>
  8. NNTP-Posting-Host: ustsu26.ust.hk
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. I have tried the following code in Visual C++. I always got the run-time error
  12. "floating point support not loaded" . What's that? The code seems to be correct
  13. since it runs correctly on UNIX. The file "some_file" contains some floating
  14. data. Pls help.
  15.  
  16.  
  17.  
  18.  
  19. #include <stdio.h>
  20. #include <stdlib.h>
  21.  
  22. void main()
  23. {
  24.     float m[8];
  25.     FILE *fp;
  26.     int i;
  27.     
  28.     if ((fp = fopen("some_file", "r")) == NULL) {
  29.         printf("File not found.");
  30.         exit(1);
  31.     }
  32.  
  33.     for(i = 0; i < 8; i++) {
  34.         fscanf(fp, "%f", &m[i]);
  35.     }
  36.     
  37.     fclose(fp);
  38. }
  39.  
  40. --
  41.  
  42. If an ideal can be reached easily it no longer is an ideal.
  43. ka ming
  44.  
  45.